package controller;

import java.util.ArrayList;

import manager.CartMgr;
import entity.Section;

/**
 * @author huiwensong.2012, jaslin.wee.2012, sheryl.tay.2012, mohameds.2012
 * 
 */

public class CartCtrl {
	CartMgr cartMgr;

	public CartCtrl() {
		cartMgr = new CartMgr();
	}

	public void addToCart(String courseCode, String sectionCode, String userId) {
		cartMgr.addSectionForStudent(courseCode, sectionCode, userId);
	}

	public ArrayList<Section> retrieveSectionsForStudent(String userId) {
		return cartMgr.retrieveSectionsForStudent(userId);
	}

	public void deleteSection(String courseCode, String sectionCode,
			String userId) {
		cartMgr.deleteSectionForStudent(courseCode, sectionCode, userId);
	}

}
